Method and apparatus for generating information

ABSTRACT

Embodiments of the present disclosure provide a method and apparatus for generating information. A method may include: selecting a three-dimensional object model from a preset three-dimensional object model set based on a to-be-matched object image in a target two-dimensional image; determining, based on a normal vector of a ground plane of the target two-dimensional image, a plane equation of ground corresponding to the normal vector of the ground plane in a three-dimensional space; adjusting a rotation parameter and a translation parameter of the three-dimensional object model in the plane characterized by the plane equation; and generating, in response to determining that a contour of the adjusted three-dimensional object model matches a contour of the to-be-matched object image in the target two-dimensional image, three-dimensional information of an object corresponding to the to-be-matched object image based on the adjusted three-dimensional object model.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No.201811238007.1, filed on Oct. 23, 2018, titled “Method and apparatus forgenerating information,” which is hereby incorporated by reference inits entirety.

TECHNICAL FIELD

Embodiments of the present disclosure relate to the field of computertechnology, and in particular to, a method and apparatus for generatinginformation.

BACKGROUND

A three-dimensional model is a polygonal identifier of an object, and isgenerally displayed using a computer or other video devices. Thedisplayed object may be an entity in a real world, or an imaginaryobject. In general, things existing in a physical world and a naturalworld may all be expressed by the three-dimensional model. Thethree-dimensional model is generally generated by three-dimensionalmodeling tool software, or generated by other methods. As data of pointand other information sets, the three-dimensional model may be generatedmanually, or generated based on a certain algorithm. A three-dimensionalmodel matching contour of a two-dimensional object image may bedetermined, and then posture information of the two-dimensional objectimage may be obtained from posture information of the three-dimensionalmodel.

SUMMARY

Embodiments of the present disclosure present a method and apparatus forgenerating information.

In a first aspect, an embodiment of the present disclosure provides amethod for generating information, including: selecting athree-dimensional object model from a preset three-dimensional objectmodel set based on a to-be-matched object image in a targettwo-dimensional image; determining, based on a normal vector of a groundplane of the target two-dimensional image, a plane equation of groundcorresponding to the normal vector of the ground plane in athree-dimensional space; adjusting a rotation parameter and atranslation parameter of the three-dimensional object model in a planecharacterized by the plane equation; and generating, in response todetermining that a contour of the adjusted three-dimensional objectmodel matches a contour of the to-be-matched object image in the targettwo-dimensional image, three-dimensional information of an objectcorresponding to the to-be-matched object image based on the adjustedthree-dimensional object model.

In some embodiments, the method further includes: adjusting, in responseto determining that the contour of the adjusted three-dimensional objectmodel mismatches the contour of the to-be-matched object image in thetarget two-dimensional image, a size of the to-be-matched object imagein the target two-dimensional image, and the rotation parameter and thetranslation parameter of the three-dimensional object model.

In some embodiments, the method further includes: re-selecting, inresponse to determining that the contour of the adjustedthree-dimensional object model mismatches the contour of theto-be-matched object image in the target two-dimensional image, anunselected three-dimensional object model from the three-dimensionalobject model set, and adjusting a rotation parameter and a translationparameter of the re-selected three-dimensional object model based on theadjusted rotation parameter and the adjusted translation parameter ofthe three-dimensional object model.

In some embodiments, the normal vector of the ground plane is determinedby: using, for ground images in preset two frames of ground images,pixel points having a gradient change of a pixel value of the groundimages greater than a preset threshold as key points, and generating keypoint sets for the ground images; and selecting a preset number of pairsof corresponding key points from the generated two key point sets, anddetermining the normal vector of the ground plane based on the selectedpreset number of pairs of key points.

In some embodiments, the three-dimensional information includes postureinformation.

In a second aspect, an embodiment of the present disclosure provides anapparatus for generating information, including: a selecting unitconfigured to select a three-dimensional object model from a presetthree-dimensional object model set based on a to-be-matched object imagein a target two-dimensional image; a determining unit configured todetermine, based on a normal vector of a ground plane of the targettwo-dimensional image, a plane equation of ground corresponding to thenormal vector of the ground plane in a three-dimensional space; a firstadjusting unit configured to adjust a rotation parameter and atranslation parameter of the three-dimensional object model in a planecharacterized by the plane equation; and a generating unit configured togenerate, in response to determining that a contour of the adjustedthree-dimensional object model matches a contour of the to-be-matchedobject image in the target two-dimensional image, three-dimensionalinformation of an object corresponding to the to-be-matched object imagebased on the adjusted three-dimensional object model.

In some embodiments, the apparatus further includes: a second adjustingunit configured to adjust, in response to determining that the contourof the adjusted three-dimensional object model mismatches the contour ofthe to-be-matched object image in the target two-dimensional image, asize of the to-be-matched object image in the target two-dimensionalimage, and the rotation parameter and the translation parameter of thethree-dimensional object model.

In some embodiments, the apparatus further includes: a third adjustingunit configured to re-select, in response to determining that thecontour of the adjusted three-dimensional object model mismatches thecontour of the to-be-matched object image in the target two-dimensionalimage, an unselected three-dimensional object model from thethree-dimensional object model set, and adjust a rotation parameter anda translation parameter of the re-selected three-dimensional objectmodel based on the adjusted rotation parameter and the adjustedtranslation parameter of the three-dimensional object model.

In some embodiments, the normal vector of the ground plane is determinedby: using, for ground images in preset two frames of ground images,pixel points having a gradient change of a pixel value of the groundimages greater than a preset threshold as key points, and generating keypoint sets for the ground images; and selecting a preset number of pairsof corresponding key points from the generated two key point sets, anddetermining the normal vector of the ground plane based on the selectedpreset number of pairs of key points.

In some embodiments, the three-dimensional information includes postureinformation.

In a third aspect, an embodiment of the present disclosure provides anelectronic device, including: one or more processors; and a storageapparatus configured to store one or more programs, where the one ormore programs, when executed by the one or more processors, cause theone or more processors to implement the method according to any oneimplementation in the first aspect.

In a fourth aspect, an embodiment of the present disclosure provides acomputer readable medium, storing a computer program thereon, where thecomputer program, when executed by a processor, implements the methodaccording to any one implementation in the first aspect.

The method and apparatus for generating information provided by theembodiments of the present disclosure first select a three-dimensionalobject model from a preset three-dimensional object model set based on ato-be-matched object image in a target two-dimensional image; thendetermine, based on a normal vector of a ground plane of the targettwo-dimensional image, a plane equation of ground corresponding to thenormal vector of the ground plane in a three-dimensional space; thenadjust a rotation parameter and a translation parameter of thethree-dimensional object model in a plane characterized by the planeequation; and finally generate, in response to determining that thecontour of the adjusted three-dimensional object model matches thecontour of the to-be-matched object image in the target two-dimensionalimage, three-dimensional information of an object corresponding to theto-be-matched object image based on the adjusted three-dimensionalobject model. The method and apparatus for generating informationprovided by the embodiments of the present disclosure match athree-dimensional object model with a to-be-matched two-dimensionalobject image, thereby achieving obtaining a rotation parameter and atranslation parameter of a matched three-dimensional object model, anduse the rotation parameter and the translation parameter of the obtainedthree-dimensional object model as three-dimensional information of theto-be-matched two-dimensional object image, thereby achieving obtainingthe three-dimensional information of the to-be-matched two-dimensionalobject image.

BRIEF DESCRIPTION OF THE DRAWINGS

After reading detailed description of non-limiting embodiments withreference to the following accompanying drawings, other features,objectives and advantages of the present disclosure will become moreapparent.

FIG. 1 is an architectural diagram of an exemplary system in whichembodiments of the present disclosure may be implemented;

FIG. 2 is a flowchart of a method for generating information accordingto an embodiment of the present disclosure;

FIG. 3 is a schematic diagram of an application scenario of the methodfor generating information according to an embodiment of the presentdisclosure;

FIG. 4 is a flowchart of the method for generating information accordingto another embodiment of the present disclosure;

FIG. 5 is a schematic structural diagram of an apparatus for generatinginformation according to an embodiment of the present disclosure; and

FIG. 6 is a schematic structural diagram of a computer system adapted toimplement a server of embodiments of the present disclosure.

DETAILED DESCRIPTION OF EMBODIMENTS

The present disclosure will be further described below in detail incombination with the accompanying drawings and the embodiments. Itshould be understood that the specific embodiments described herein aremerely used for explaining the relevant disclosure, rather than limitingthe disclosure. In addition, it should be further noted that, for theease of description, only the parts related to the relevant disclosureare shown in the accompanying drawings.

It should be noted that the embodiments in the present disclosure andthe features in the embodiments may be combined with each other on anon-conflict basis. The present disclosure will be described below indetail with reference to the accompanying drawings and in combinationwith the embodiments.

FIG. 1 shows an exemplary architecture 100 in which a method forgenerating information or an apparatus for generating information ofembodiments of present disclosure may be implemented.

As shown in FIG. 1, the system architecture 100 may include terminaldevices 101, 102, and 103, a network 104, and a server 105. The network104 serves as a medium providing a communication link between theterminal devices 101, 102, and 103, and the server 105. The network 104may include various types of connections, such as wired or wirelesscommunication links, or optical fibers.

The terminal devices 101, 102, and 103 interact with the server 105 viathe network 104, for example, to receive or send a message. The terminaldevices 101, 102, and 103 may be provided with various applications,such as an information generation application, a web browserapplication, a shopping application, a search application, an instantmessaging tool, an email client, social platform software, a textediting application, a browser application, and a reading application.

The terminal devices 101, 102, and 103 may be hardware or software. Whenthe terminal devices 101, 102, and 103 are hardware, the terminaldevices may be various electronic devices, including but not limited toa smart phone, a tablet computer, an ebook reader, a laptop portablecomputer, a desktop computer, or the like. When the terminal devices101, 102, and 103 are software, the terminal devices may be installed inthe above-listed electronic devices, or be implemented as a plurality ofsoftware programs or software modules (e.g., software programs orsoftware modules for providing distributed services), or as a singlesoftware program or software module. This is not specifically limitedhere.

The server 105 may be a server providing various services, such as aserver providing services for information generation applications on theterminal devices 101, 102, and 103. The information generationapplications may include an image identification application, and atarget tracking application. The server 105 may store variousthree-dimensional object models and two-dimensional images, for example,a three-dimensional vehicle model and a two-dimensional on-road vehicleimage.

It should be noted that the method for generating information providedin embodiments of the present disclosure is generally executed by theterminal devices 101, 102, and 103. Accordingly, the apparatus forgenerating information is generally provided in the terminal devices101, 102, and 103.

It should be further noted that the terminal devices 101, 102, and 103may also store three-dimensional object models and two-dimensionalimages. In this case, the server 105 and the network 104 may not existin the exemplary system architecture 100.

It should be understood that the numbers of terminal devices, networks,and servers in FIG. 1 are merely illustrative. Any number of terminaldevices, networks, and servers may be provided based on actualrequirements.

Further referring to FIG. 2, a process 200 of a method for generatinginformation according to an embodiment of the present disclosure isshown. The method for generating information includes the followingsteps.

Step 201: selecting a three-dimensional object model from a presetthree-dimensional object model set based on a to-be-matched object imagein a target two-dimensional image.

In the present embodiment, an executing body (e.g., the terminal devices101, 102, and 103 in FIG. 1) may calculate a matching degree between thethree-dimensional object model and the to-be-matched object image, todetermine a three-dimensional object model most approximate to theabove-described to-be-matched object image in the three-dimensionalobject model set. Then, the executing body selects the above determinedthree-dimensional object model. The executing body may alternativelycollect a result inputted by a user after comparing a similarity degreebetween the three-dimensional object model and the to-be-matched objectimage, to determine the selected three-dimensional object model.

In the present embodiment, the two-dimensional image may be atwo-dimensional color image. Optionally, an object characterized by theto-be-matched object image in the target two-dimensional image may be avehicle, or a roadside sign board, which is not limited herein. Thethree-dimensional object model may be a vehicle model, or other modeldesigned based on actual requirements, which is not limited herein. Theabove target two-dimensional image may be a to-be-matchedtwo-dimensional image selected from a specified two-dimensional imageset.

Step 202: determining, based on a normal vector of a ground plane of thetarget two-dimensional image, a plane equation of ground correspondingto the normal vector of the ground plane in a three-dimensional space.

In the present embodiment, the normal vector of the ground plane of thetarget two-dimensional image refers to a normal vector of the groundplane displayed in the above target two-dimensional image in thethree-dimensional space. Generally, the executing body may determine theplane equation of the ground plane based on the normal vector andcoordinates of any one point in the ground plane. It should be notedthat the method of determining, based on a point in a plane and a normalvector of the plane, the plane equation of the plane is a well-knowntechnology widely studied and applied, and repeated description thereofwill be omitted here.

Step 203: adjusting a rotation parameter and a translation parameter ofthe three-dimensional object model in a plane characterized by the planeequation.

In the present embodiment, the rotation parameter generally refers to arotation angle of the three-dimensional object model with the normalvector of the ground plane as a rotation axis. The translation parametergenerally refers to a translation parameter of the three-dimensionalobject model in the above plane along two axes. The two axes refer tocoordinate axes, perpendicular to the normal vector of the ground plane,in a three-dimensional space of the above plane. Generally, the rotationparameter and the translation parameter may be adjusted by changing therotation angle and a value of the translation parameter. The rotationparameter and the translation parameter are generally used to representa posture of the three-dimensional object model.

Step 204: generating, in response to determining that a contour of theadjusted three-dimensional object model matches a contour of theto-be-matched object image in the target two-dimensional image,three-dimensional information of an object corresponding to theto-be-matched object image based on the adjusted three-dimensionalobject model.

In the present embodiment, the executing body may determine whether thecontour of the three-dimensional object model matches the contour of theto-be-matched object image by determining whether a similarity betweenthe contour of the three-dimensional object model and the contour of theto-be-matched object image meets a preset condition, or by collecting aresult inputted by the user after comparing a similarity degree betweenthe contour of the three-dimensional object model and the contour of theto-be-matched object image, which is not limited herein.

The three-dimensional information of the object generally refers tofeature information of the object (e.g., a three-dimensional boundingbox of the object). The three-dimensional information of the object mayalternatively refer to posture information of the object correspondingto an object image and displayed in the image. The posture informationmay include: the rotation parameter and the translation parameter. Therotation parameter generally refers to a rotation angle of the objectdisplayed in the image with the normal vector of the ground plane as arotation axis. The translation parameter generally refers to atranslation parameter of the object displayed in the image in the aboveplane along two axes. The two axes refer to the coordinate axes,perpendicular to the normal vector of the ground plane, in thethree-dimensional space of the above plane. The rotation parameter andthe translation parameter are generally used to characterize a postureof the object displayed in the image.

The method provided by the above embodiments of the present disclosuredetermines a plane of the ground based on the normal vector of theground plane of the target two-dimensional image. The three-dimensionalobject model can be rotated and translated merely on the ground, therebyreducing a degree of freedom of motion of the three-dimensional objectmodel in space. Specifically, the three-dimensional object model can berotated merely around a normal vector of the ground plane, the number ofrotational degrees of freedom changes from 3 to 1, the three-dimensionalobject model can be moved merely along the ground, and the number oftranslational degrees of freedom changes from 3 to 2. Therefore, themethod provided by the above embodiments of the present disclosuregreatly reduces the complexity of the user's operation, and improves theefficiency of matching the contour of the three-dimensional object modelwith contour of an object in the two-dimensional image.

Further referring to FIG. 3, FIG. 3 is a schematic diagram of anapplication scenario 300 of the method for generating informationaccording to the present embodiment. In the application scenario 300 ofFIG. 3, a terminal device 301 may select a cuboid 305 from a presetthree-dimensional object model set 304 based on a to-be-matched cuboidimage 303 in a two-dimensional image 302; determine, based on a normalvector (a z axis of an x-y-z coordinate system) of a ground plane of thetwo-dimensional image, a plane equation (an x-y plane in the x-y-zcoordinate system) of ground corresponding to the normal vector of theground plane in a three-dimensional space; adjust a rotation parameter(a rotation angle φ of the z axis) and a translation parameter (an xcoordinate and a y coordinate, e.g., (b, c)) of the cuboid 305 in aplane (the x-y plane in the x-y-z coordinate system) characterized bythe plane equation; and generate, in response to determining that acontour of the adjusted cuboid 305 matches a contour of theto-be-matched cuboid image 303 in the target two-dimensional image 302,three-dimensional information (the rotation angle φ, the x coordinate b,and the y coordinate c) of a cuboid corresponding to the to-be-matchedcuboid image 303 based on the adjusted cuboid 305.

The method provided by the above embodiments of the present disclosuredetermines a plane of the ground based on the normal vector of theground plane of the target two-dimensional image. The three-dimensionalobject model can be rotated and translated merely on the ground, therebyreducing a degree of freedom of motion of the three-dimensional objectmodel in space. Specifically, the three-dimensional object model can berotated merely around a normal vector of the ground plane, the number ofrotational degrees of freedom changes from 3 to 1, the three-dimensionalobject model can be moved merely along the ground, and the number oftranslational degrees of freedom changes from 3 to 2. Therefore, themethod provided by the above embodiments of the present disclosuregreatly reduces the complexity of the user's operation, and may improvethe efficiency of matching the contour of the three-dimensional objectmodel with contour of an object in the two-dimensional image.

Further referring to FIG. 4, a process 400 of another embodiment of themethod for generating information is shown. The process 400 of themethod for generating information includes the following steps.

Step 401: selecting a three-dimensional object model from a presetthree-dimensional object model set based on a to-be-matched object imagein a target two-dimensional image.

Step 402: determining, based on a normal vector of a ground plane of thetarget two-dimensional image, a plane equation of ground correspondingto the normal vector of the ground plane in a three-dimensional space.

Step 403: adjusting a rotation parameter and a translation parameter ofthe three-dimensional object model in a plane characterized by the planeequation.

Step 404: generating, in response to determining that a contour of theadjusted three-dimensional object model matches a contour of theto-be-matched object image in the target two-dimensional image,three-dimensional information of an object corresponding to theto-be-matched object image based on the adjusted three-dimensionalobject model.

Specific operations in steps 401-404 in the present embodiment arebasically identical to the operations in steps 201-204 in the embodimentshown in FIG. 2, and the description of which will not be repeated here.

The normal vector of the ground plane of the target two-dimensionalimage refers to a normal vector of the ground plane displayed in theabove target two-dimensional image in the three-dimensional space.Generally, the plane equation of the ground plane may be determinedbased on the normal vector and coordinates of any one point in theground plane. The method of determining the plane equation is awell-known technology widely studied and applied, and the descriptionthereof will not be repeated here. As an example, the coordinates of anyone point in the ground plane may be obtained based on a photographingposition of the target two-dimensional image. Specifically, thecoordinates of any one point in the ground plane may be obtained basedon a height of the photographing position. For example, in a roadscenario, the photographing position is generally arranged on a top of avehicle, and the height of the photographing position may be obtainedbased on a height of the top of the vehicle. As another example, adirection of the determined normal vector of the ground plane may beused as a coordinate axis of a three-dimensional coordinate space, and aplane of the other two coordinate axes perpendicular to the normalvector of the ground plane is used as the ground. Then, groundorientation may be determined based on the photographing position.

In some alternative implementations of the present embodiment, thenormal vector of the ground plane of the target two-dimensional imagemay be determined by: using, for ground images in preset two frames ofground images, pixel points having a gradient change of a pixel value ofthe ground images greater than a preset threshold as key points, andgenerating key point sets for the ground images; and selecting a presetnumber of pairs of corresponding key points from the generated two keypoint sets, and determining the normal vector of the ground plane basedon the selected preset number of pairs of key points.

The preset two frames of ground images generally refer to two imagesphotographed from different angles of given ground. The preset thresholdmay be set based on actual requirements. The preset number of pairs maybe set based on actual requirements (e.g., 4 pairs). Each pair of keypoints among the preset number of pairs is obtained by selecting one keypoint from each of the two key point sets. Each pair of key pointsrefers to pixel points of a given position in the given ground in twoimages.

In some alternative implementations of the present embodiment, thethree-dimensional information may include at least one of the followingitems: the rotation parameter or the translation parameter.

Step 405: adjusting, in response to determining that the contour of theadjusted three-dimensional object model mismatching the contour of theto-be-matched object image in the target two-dimensional image, a sizeof the to-be-matched object image in the target two-dimensional image,and the rotation parameter and the translation parameter of thethree-dimensional object model.

In the present embodiment, the adjusting a size of the object imagegenerally refers to zooming in or zooming out the object image. Specificoperations of the adjusting the rotation parameter and the translationparameter of the three-dimensional object model are basically identicalto the operations in step 203 in the embodiment shown in FIG. 2, and thedescription thereof will not be repeated here.

In the present embodiment, after performing the above adjustingoperations, whether the contour of the adjusted three-dimensional objectmodel matches the contour of the to-be-matched object image in thetarget two-dimensional image is further determined.

Step 406: re-selecting, in response to determining that the contour ofthe adjusted three-dimensional object model mismatches the contour ofthe to-be-matched object image in the target two-dimensional image, anunselected three-dimensional object model from the three-dimensionalobject model set, and adjusting a rotation parameter and a translationparameter of the re-selected three-dimensional object model based on theadjusted rotation parameter and the adjusted translation parameter ofthe three-dimensional object model.

Specific operations of the adjusting the rotation parameter and thetranslation parameter of the three-dimensional object model in thepresent embodiment are basically identical to the operations in step 203in the embodiment shown in FIG. 2, and the description thereof will notbe repeated here.

As can be seen from FIG. 4, compared with the corresponding embodimentof FIG. 2, the process 400 of the method for generating information inthe present embodiment emphasizes steps 405-406. Thus, the schemedescribed in the present embodiment may, after determining thethree-dimensional object model mismatching the object image, furtheradjust the size of the object image and a posture of thethree-dimensional object model, and then further perform contourmatching. If the contour of the adjusted three-dimensional object modelstill mismatches the contour of the to-be-matched object image in thetarget two-dimensional image, then the three-dimensional object model isreplaced to further perform the contour matching based on the rotationparameter and the translation parameter. Thus, diversified and efficientcontour matching is achieved, and the three-dimensional information ofthe object is obtained based on the matching result.

Further referring to FIG. 5, as an implementation of the method shown inthe above figures, the present disclosure provides an embodiment of anapparatus for generating information. The embodiment of the apparatuscorresponds to the embodiment of the method shown in FIG. 2. Theapparatus may be specifically applied to various electronic devices.

As shown in FIG. 5, the apparatus 500 for generating informationprovided by the present embodiment includes: a selecting unit 501, adetermining unit 502, a first adjusting unit 503, and a generating unit504. The selecting unit 501 is configured to select a three-dimensionalobject model from a preset three-dimensional object model set based on ato-be-matched object image in a target two-dimensional image; thedetermining unit 502 is configured to determine, based on a normalvector of a ground plane of the target two-dimensional image, a planeequation of ground corresponding to the normal vector of the groundplane in a three-dimensional space; the first adjusting unit 503 isconfigured to adjust a rotation parameter and a translation parameter ofthe three-dimensional object model in a plane characterized by the planeequation; and the generating unit 504 is configured to generate, inresponse to determining that a contour of the adjusted three-dimensionalobject model matches a contour of the to-be-matched object image in thetarget two-dimensional image, three-dimensional information of an objectcorresponding to the to-be-matched object image based on the adjustedthree-dimensional object model.

In the present embodiment, specific processing of the selecting unit501, the determining unit 502, the first adjusting unit 503, and thegenerating unit 504 in the apparatus 500 for generating information andthe technical effects thereof may refer to the related description ofstep 201, step 202, step 203, and step 204 in the correspondingembodiment of FIG. 2, respectively, and the description thereof will notbe repeated here.

In some alternative implementations of the present embodiment, theapparatus 500 for generating information further includes: a secondadjusting unit (not shown in the figure) configured to adjust, inresponse to determining that the contour of the adjustedthree-dimensional object model mismatches the contour of theto-be-matched object image in the target two-dimensional image, a sizeof the to-be-matched object image in the target two-dimensional image,and the rotation parameter and the translation parameter of thethree-dimensional object model.

In some alternative implementations of the present embodiment, theapparatus 500 for generating information further includes: a thirdadjusting unit (not shown in the figure) configured to re-select, inresponse to determining that the contour of the adjustedthree-dimensional object model mismatches the contour of theto-be-matched object image in the target two-dimensional image, anunselected three-dimensional object model from the three-dimensionalobject model set, and adjust a rotation parameter and a translationparameter of the re-selected three-dimensional object model based on theadjusted rotation parameter and the adjusted translation parameter ofthe three-dimensional object model.

In some alternative implementations of the present embodiment, thenormal vector of the ground plane is determined by: using, for groundimages in preset two frames of ground images, pixel points having agradient change of a pixel value of the ground images greater than apreset threshold as key points, and generating key point sets for theground images; and selecting a preset number of pairs of correspondingkey points from the generated two key point sets, and determining thenormal vector of the ground plane based on the selected preset number ofpairs of key points.

The apparatus provided by the above embodiment of the present disclosureselects the three-dimensional object model from the presetthree-dimensional object model set through the selecting unit 501,determines, based on a normal vector of a ground plane of the targettwo-dimensional image, a plane equation of ground corresponding to thenormal vector of the ground plane in a three-dimensional space throughthe determining unit 502, adjusts a rotation parameter and a translationparameter of the three-dimensional object model in a plane characterizedby the plane equation through the adjusting unit 503, and thengenerates, in response to determining that the contour of the adjustedthree-dimensional object model matches the contour of the to-be-matchedobject image in the target two-dimensional image, three-dimensionalinformation of an object corresponding to the to-be-matched object imagethrough the generating unit 504 based on the adjusted three-dimensionalobject model, thereby achieving generating the three-dimensionalinformation of the object image in the two-dimensional image.

Referring to FIG. 6, a schematic structural diagram of a computer system600 adapted to implement a server of embodiments of the presentdisclosure is shown. The server shown in FIG. 6 is merely an example,and should not limit the functions and scope of use of the embodimentsof the present disclosure.

As shown in FIG. 6, the computer system 600 includes a centralprocessing unit (CPU) 601, which may execute various appropriate actionsand processes in accordance with a program stored in a read only memory(ROM) 602 or a program loaded into a random access memory (RAM) 603 froma storage portion 608. The RAM 603 further stores various programs anddata required by operations of the system 600. The CPU 601, the ROM 602and the RAM 603 are connected to each other through a bus 604. Aninput/output (I/O) interface 605 is also connected to the bus 604.

The following components are connected to the I/O interface 605: aninput portion 606 including a keyboard, a mouse, or the like; an outputportion 607 including a cathode ray tube (CRT), a liquid crystal displaydevice (LCD), a speaker, or the like; a storage portion 608 including ahard disk, or the like; and a communication portion 609 including anetwork interface card, such as a LAN card and a modem. Thecommunication portion 609 performs communication processes via anetwork, such as the Internet. A driver 610 is also connected to the I/Ointerface 605 as required. A removable medium 611, such as a magneticdisk, an optical disk, a magneto-optical disk, and a semiconductormemory, may be installed on the driver 610 as required, such that acomputer program read therefrom is installed on the storage portion 608as needed.

In particular, according to the embodiments of the present disclosure,the process described above with reference to the flow chart may beimplemented in a computer software program. For example, an embodimentof the present disclosure includes a computer program product, whichincludes a computer program that is tangibly embedded in a computerreadable medium. The computer program includes program codes forexecuting the method as illustrated in the flow chart. In such anembodiment, the computer program may be downloaded and installed from anetwork via the communication portion 609, and/or may be installed fromthe removable medium 611. The computer program, when executed by thecentral processing unit (CPU) 601, implements the above functionalitiesdefined by the method of the present disclosure.

It should be noted that the computer readable medium of the presentdisclosure may be a computer readable signal medium or a computerreadable storage medium or any combination of the above two. An exampleof the computer readable storage medium may include, but is not limitedto: electric, magnetic, optical, electromagnetic, infrared, orsemiconductor systems, apparatuses, elements, or a combination of any ofthe above. A more specific example of the computer readable storagemedium may include, but is not limited to: electrical connection withone or more pieces of wire, a portable computer disk, a hard disk, arandom access memory (RAM), a read only memory (ROM), an erasableprogrammable read only memory (EPROM or flash memory), an optical fiber,a portable compact disk read only memory (CD-ROM), an optical memory, amagnetic memory device, or any suitable combination of the above. In thepresent disclosure, the computer readable storage medium may be anytangible medium containing or storing programs, which may be used by, orused in combination with, a command execution system, apparatus orelement. In the present disclosure, the computer readable signal mediummay include a data signal in the base band or propagating as a part of acarrier wave, in which computer readable program codes are carried. Thepropagating data signal may take various forms, including but notlimited to an electromagnetic signal, an optical signal, or any suitablecombination of the above. The computer readable signal medium may alsobe any computer readable medium except for the computer readable storagemedium. The computer readable medium is capable of transmitting,propagating or transferring programs for use by, or used in combinationwith, a command execution system, apparatus or element. The programcodes contained on the computer readable medium may be transmitted withany suitable medium, including but not limited to: wireless, wired,optical cable, RF medium, etc., or any suitable combination of theabove.

A computer program code for executing operations in the presentdisclosure may be compiled using one or more programming languages orcombinations thereof. The programming languages include object-orientedprogramming languages, such as Java, Smalltalk or C++, and also includeconventional procedural programming languages, such as “C” language orsimilar programming languages. The program code may be completelyexecuted on a user's computer, partially executed on a user's computer,executed as a separate software package, partially executed on a user'scomputer and partially executed on a remote computer, or completelyexecuted on a remote computer or server. In a circumstance involving aremote computer, the remote computer may be connected to a user'scomputer through any network, including local area network (LAN) or widearea network (WAN), or may be connected to an external computer (forexample, connected through the Internet using an Internet serviceprovider).

The flow charts and block diagrams in the accompanying drawingsillustrate architectures, functionalities and operations that may beimplemented according to the systems, methods and computer programproducts of the various embodiments of the present disclosure. In thisregard, each of the blocks in the flow charts or block diagrams mayrepresent a module, a program segment, or a code portion, said module,program segment, or code portion including one or more executableinstructions for implementing specified logical functions. It should befurther noted that, in some alternative implementations, thefunctionalities denoted by the blocks may occur in a sequence differentfrom the sequences shown in the figures. For example, any two blockspresented in succession may be executed substantially in parallel, orthey may sometimes be executed in a reverse sequence, depending on thefunctionalities involved. It should be further noted that each block inthe block diagrams and/or flow charts as well as a combination of blocksin the block diagrams and/or flow charts may be implemented using adedicated hardware-based system executing specified functions oroperations, or by a combination of dedicated hardware and computerinstructions.

The units involved in the embodiments of the present disclosure may beimplemented by software or hardware. The described units may also beprovided in a processor, for example, described as: a processorincluding a selecting unit, a determining unit, a first adjusting unit,and a generating unit. The names of the units do not constitute alimitation to such units themselves in some cases. For example, thefirst adjusting unit may also be described as “a unit configured toadjust a rotation parameter and a translation parameter of thethree-dimensional object model in a plane characterized by the planeequation.”

In another aspect, the present disclosure further provides a computerreadable medium. The computer readable medium may be included in theapparatus described in the above embodiments, or a stand-alone computerreadable medium without being assembled into the apparatus. The computerreadable medium stores one or more programs. The one or more programs,when executed by the apparatus, cause the apparatus to: select athree-dimensional object model from a preset three-dimensional objectmodel set based on a to-be-matched object image in a targettwo-dimensional image; determine, based on a normal vector of a groundplane of the target two-dimensional image, a plane equation of groundcorresponding to the normal vector of the ground plane in athree-dimensional space; adjust a rotation parameter and a translationparameter of the three-dimensional object model in the planecharacterized by the plane equation; and generate, in response todetermining that a contour of the adjusted three-dimensional objectmodel matches a contour of the to-be-matched object image in the targettwo-dimensional image, three-dimensional information of an objectcorresponding to the to-be-matched object image based on the adjustedthree-dimensional object model.

The above description only provides explanation of the preferredembodiments and the employed technical principles of the presentdisclosure. It should be appreciated by those skilled in the art thatthe inventive scope of the present disclosure is not limited to thetechnical solutions formed by the particular combinations of theabove-described technical features. The inventive scope should alsocover other technical solutions formed by any combination of theabove-described technical features or equivalent features thereofwithout departing from the concept of the disclosure, for example,technical solutions formed by the above-described features beinginterchanged with, but not limited to, technical features with similarfunctions disclosed in the present disclosure.

What is claimed is:
 1. A method for generating information, comprising:selecting a three-dimensional object model from a presetthree-dimensional object model set based on a to-be-matched object imagein a target two-dimensional image; determining, based on a normal vectorof a ground plane of the target two-dimensional image, a plane equationof ground corresponding to the normal vector of the ground plane in athree-dimensional space; adjusting a rotation parameter and atranslation parameter of the three-dimensional object model in a planecharacterized by the plane equation; and generating, in response todetermining that a contour of the adjusted three-dimensional objectmodel matches a contour of the to-be-matched object image in the targettwo-dimensional image, three-dimensional information of an objectcorresponding to the to-be-matched object image based on the adjustedthree-dimensional object model.
 2. The method according to claim 1,wherein the method further comprises: adjusting, in response todetermining that the contour of the adjusted three-dimensional objectmodel mismatches the contour of the to-be-matched object image in thetarget two-dimensional image, a size of the to-be-matched object imagein the target two-dimensional image, and the rotation parameter and thetranslation parameter of the three-dimensional object model.
 3. Themethod according to claim 1, wherein the method further comprises:re-selecting, in response to determining that the contour of theadjusted three-dimensional object model mismatches the contour of theto-be-matched object image in the target two-dimensional image, anunselected three-dimensional object model from the three-dimensionalobject model set; and adjusting a rotation parameter and a translationparameter of the re-selected three-dimensional object model based on theadjusted rotation parameter and the adjusted translation parameter ofthe three-dimensional object model.
 4. The method according to claim 1,wherein the normal vector of the ground plane is determined by: forground images in preset two frames of ground images: using pixel pointshaving a gradient change of a pixel value of the ground images greaterthan a preset threshold as key points; and generating key point sets forthe ground images; selecting a preset number of pairs of correspondingkey points from the generated two key point sets; and determining thenormal vector of the ground plane based on the selected preset number ofpairs of key points.
 5. The method according to claim 1, wherein thethree-dimensional information comprises posture information.
 6. Anapparatus for generating information, comprising: at least oneprocessor; and a memory storing instructions, wherein the instructionswhen executed by the at least one processor, cause the at least oneprocessor to perform operations, the operations comprising: selecting athree-dimensional object model from a preset three-dimensional objectmodel set based on a to-be-matched object image in a targettwo-dimensional image; determining, based on a normal vector of a groundplane of the target two-dimensional image, a plane equation of groundcorresponding to the normal vector of the ground plane in athree-dimensional space; adjusting a rotation parameter and atranslation parameter of the three-dimensional object model in a planecharacterized by the plane equation; and generating, in response todetermining that a contour of the adjusted three-dimensional objectmodel matches a contour of the to-be-matched object image in the targettwo-dimensional image, three-dimensional information of an objectcorresponding to the to-be-matched object image based on the adjustedthree-dimensional object model.
 7. The apparatus according to claim 6,wherein the operations further comprise: adjusting, in response todetermining that the contour of the adjusted three-dimensional objectmodel mismatches the contour of the to-be-matched object image in thetarget two-dimensional image, a size of the to-be-matched object imagein the target two-dimensional image, and the rotation parameter and thetranslation parameter of the three-dimensional object model.
 8. Theapparatus according to claim 6, wherein the operations further comprise:re-selecting, in response to determining that the contour of theadjusted three-dimensional object model mismatches the contour of theto-be-matched object image in the target two-dimensional image, anunselected three-dimensional object model from the three-dimensionalobject model set; and adjusting a rotation parameter and a translationparameter of the re-selected three-dimensional object model based on theadjusted rotation parameter and the adjusted translation parameter ofthe three-dimensional object model.
 9. The apparatus according to claim6, wherein the normal vector of the ground plane is determined by: forground images in preset two frames of ground images: using pixel pointshaving a gradient change of a pixel value of the ground images greaterthan a preset threshold as key points; and generating key point sets forthe ground images; selecting a preset number of pairs of correspondingkey points from the generated two key point sets; and determining thenormal vector of the ground plane based on the selected preset number ofpairs of key points.
 10. The apparatus according to claim 6, wherein thethree-dimensional information comprises posture information.
 11. Anon-transitory computer readable medium, storing a computer programthereon, wherein the computer program, when executed by a processor,causes the processor to perform operations, the operations comprising:selecting a three-dimensional object model from a presetthree-dimensional object model set based on a to-be-matched object imagein a target two-dimensional image; determining, based on a normal vectorof a ground plane of the target two-dimensional image, a plane equationof ground corresponding to the normal vector of the ground plane in athree-dimensional space; adjusting a rotation parameter and atranslation parameter of the three-dimensional object model in a planecharacterized by the plane equation; and generating, in response todetermining that a contour of the adjusted three-dimensional objectmodel matches a contour of the to-be-matched object image in the targettwo-dimensional image, three-dimensional information of an objectcorresponding to the to-be-matched object image based on the adjustedthree-dimensional object model.
 12. The non-transitory computer readablemedium according to claim 11, wherein the operations further comprise:adjusting, in response to determining that the contour of the adjustedthree-dimensional object model mismatches the contour of theto-be-matched object image in the target two-dimensional image, a sizeof the to-be-matched object image in the target two-dimensional image,and the rotation parameter and the translation parameter of thethree-dimensional object model.
 13. The non-transitory computer readablemedium according to claim 11, wherein the operations further comprise:re-selecting, in response to determining that the contour of theadjusted three-dimensional object model mismatches the contour of theto-be-matched object image in the target two-dimensional image, anunselected three-dimensional object model from the three-dimensionalobject model set; and adjusting a rotation parameter and a translationparameter of the re-selected three-dimensional object model based on theadjusted rotation parameter and the adjusted translation parameter ofthe three-dimensional object model.
 14. The non-transitory computerreadable medium according to claim 11, wherein the normal vector of theground plane is determined by: for ground images in preset two frames ofground images: using pixel points having a gradient change of a pixelvalue of the ground images greater than a preset threshold as keypoints; and generating key point sets for the ground images; selecting apreset number of pairs of corresponding key points from the generatedtwo key point sets; and determining the normal vector of the groundplane based on the selected preset number of pairs of key points. 15.The non-transitory computer readable medium according to claim 11,wherein the three-dimensional information comprises posture information.